//
//  AuthOperator.m
//  CToolBox
//
//  Created by 张吉旭 on 17/2/7.
//  Copyright © 2017年 yj. All rights reserved.
//

#import "AuthOperator.h"
#define kAPISubPath @"cetmsplat"

@implementation AuthOperator

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setHostWithPath:kAPISubPath];
    }
    return self;
}




#pragma mark - -----------------yy---------------------
// 登陆
- (void)postApplogin:(NSDictionary *)userInfo tag:(id)tag successBlock:(succeedBlock)successBlock failureBlock:(failureBlock)failureBlock
{
    
    NSString *url = [self getUrlWithMethod:@"applogin"];
    
    DataVisitor *visitor = [[DataVisitor alloc] init];
    [visitor executePOSTWithUrl:url Params:userInfo tag:tag successBlock:^(id respondObject) {
        if (successBlock) {
            successBlock(respondObject);
        }
    } failureBlock:^(id respondObject) {
        failureBlock(respondObject);
    }];
    
}

@end
